<html>
<body style="margin: 0; cursor: none;">
<script src="../tma.js"></script>
<script>
tma.extlibs = [ 'ext/gl-matrix.js', 'ext/mv/MajVj.js' ];
tma.onload = function () {
	var vj = new MajVj(512, 512);
	MajVj.loadAllPlugins().then(function () {
		var effect = vj.create('effect', 'glow');
		var wired = vj.create('frame', 'wired');
		var fbo = vj.screen().createFrameBuffer(512, 512);
		vj.run(function (delta) {
			fbo.bind();
			vj.screen().fillColor(0.0, 0.0, 0.0, 1.0);
			wired.draw(delta);
			vj.screen().bind();
			effect.draw(delta, fbo.texture);
			vj.screen().flush();
		});
		window.onresize = function () {
			vj.onresize();
			var ratio = vj.ratio();
			effect.onresize(ratio);
			wired.onresize(ratio);
		};
	}, function (e) { console.log('plugin load error: ' + e); });
};
</script>
</body>
</html>
